{"ast":null,"code":"import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport React from 'react';\nimport classNames from 'classnames';\nimport CloseOutlined from \"@ant-design/icons/es/icons/CloseOutlined\";\nimport LocaleReceiver from '../locale/LocaleReceiver';\nimport Button from '../button';\nimport defaultLocale from '../locale/en_US';\nvar panelRender = function panelRender(props, current, type) {\n  var prefixCls = props.prefixCls,\n    _props$total = props.total,\n    total = _props$total === void 0 ? 1 : _props$total,\n    title = props.title,\n    onClose = props.onClose,\n    onPrev = props.onPrev,\n    onNext = props.onNext,\n    onFinish = props.onFinish,\n    cover = props.cover,\n    description = props.description,\n    nextButtonProps = props.nextButtonProps,\n    prevButtonProps = props.prevButtonProps,\n    stepRender = props.stepRender,\n    stepType = props.type,\n    arrow = props.arrow,\n    className = props.className;\n  var mergedType = typeof stepType !== 'undefined' ? stepType : type;\n  var isLastStep = current === total - 1;\n  var prevBtnClick = function prevBtnClick() {\n    onPrev === null || onPrev === void 0 ? void 0 : onPrev();\n    if (typeof (prevButtonProps === null || prevButtonProps === void 0 ? void 0 : prevButtonProps.onClick) === 'function') {\n      prevButtonProps === null || prevButtonProps === void 0 ? void 0 : prevButtonProps.onClick();\n    }\n  };\n  var nextBtnClick = function nextBtnClick() {\n    if (isLastStep) {\n      onFinish === null || onFinish === void 0 ? void 0 : onFinish();\n    } else {\n      onNext === null || onNext === void 0 ? void 0 : onNext();\n    }\n    if (typeof (nextButtonProps === null || nextButtonProps === void 0 ? void 0 : nextButtonProps.onClick) === 'function') {\n      nextButtonProps === null || nextButtonProps === void 0 ? void 0 : nextButtonProps.onClick();\n    }\n  };\n  var headerNode;\n  if (title) {\n    headerNode = /*#__PURE__*/React.createElement(\"div\", {\n      className: \"\".concat(prefixCls, \"-header\")\n    }, /*#__PURE__*/React.createElement(\"div\", {\n      className: \"\".concat(prefixCls, \"-title\")\n    }, title));\n  }\n  var descriptionNode;\n  if (description) {\n    descriptionNode = /*#__PURE__*/React.createElement(\"div\", {\n      className: \"\".concat(prefixCls, \"-description\")\n    }, description);\n  }\n  var coverNode;\n  if (cover) {\n    coverNode = /*#__PURE__*/React.createElement(\"div\", {\n      className: \"\".concat(prefixCls, \"-cover\")\n    }, cover);\n  }\n  var mergedSlickNode = typeof stepRender === 'function' && stepRender(current, total) || _toConsumableArray(Array.from({\n    length: total\n  }).keys()).map(function (stepItem, index) {\n    return /*#__PURE__*/React.createElement(\"span\", {\n      key: stepItem,\n      className: classNames(index === current && \"\".concat(prefixCls, \"-slider-active\"), \"\".concat(prefixCls, \"-slider\"))\n    });\n  });\n  var slickNode = total > 1 ? mergedSlickNode : null;\n  var mainBtnType = mergedType === 'primary' ? 'default' : 'primary';\n  var secondaryBtnProps = {\n    type: 'default',\n    ghost: mergedType === 'primary'\n  };\n  return /*#__PURE__*/React.createElement(LocaleReceiver, {\n    componentName: \"Tour\",\n    defaultLocale: defaultLocale.Tour\n  }, function (contextLocale) {\n    var _a, _b;\n    return /*#__PURE__*/React.createElement(\"div\", {\n      className: classNames(mergedType === 'primary' ? \"\".concat(prefixCls, \"-primary\") : '', className, \"\".concat(prefixCls, \"-content\"))\n    }, arrow && /*#__PURE__*/React.createElement(\"div\", {\n      className: \"\".concat(prefixCls, \"-arrow\"),\n      key: \"arrow\"\n    }), /*#__PURE__*/React.createElement(\"div\", {\n      className: \"\".concat(prefixCls, \"-inner\")\n    }, /*#__PURE__*/React.createElement(CloseOutlined, {\n      className: \"\".concat(prefixCls, \"-close\"),\n      onClick: onClose\n    }), coverNode, headerNode, descriptionNode, /*#__PURE__*/React.createElement(\"div\", {\n      className: \"\".concat(prefixCls, \"-footer\")\n    }, /*#__PURE__*/React.createElement(\"div\", {\n      className: \"\".concat(prefixCls, \"-sliders\")\n    }, slickNode), /*#__PURE__*/React.createElement(\"div\", {\n      className: \"\".concat(prefixCls, \"-buttons\")\n    }, current !== 0 ? /*#__PURE__*/React.createElement(Button, Object.assign({}, secondaryBtnProps, prevButtonProps, {\n      onClick: prevBtnClick,\n      size: \"small\",\n      className: classNames(\"\".concat(prefixCls, \"-prev-btn\"), prevButtonProps === null || prevButtonProps === void 0 ? void 0 : prevButtonProps.className)\n    }), (_a = prevButtonProps === null || prevButtonProps === void 0 ? void 0 : prevButtonProps.children) !== null && _a !== void 0 ? _a : contextLocale.Previous) : null, /*#__PURE__*/React.createElement(Button, Object.assign({\n      type: mainBtnType\n    }, nextButtonProps, {\n      onClick: nextBtnClick,\n      size: \"small\",\n      className: classNames(\"\".concat(prefixCls, \"-next-btn\"), nextButtonProps === null || nextButtonProps === void 0 ? void 0 : nextButtonProps.className)\n    }), (_b = nextButtonProps === null || nextButtonProps === void 0 ? void 0 : nextButtonProps.children) !== null && _b !== void 0 ? _b : isLastStep ? contextLocale.Finish : contextLocale.Next)))));\n  });\n};\nexport default panelRender;","map":{"version":3,"names":["_toConsumableArray","React","classNames","CloseOutlined","LocaleReceiver","Button","defaultLocale","panelRender","props","current","type","prefixCls","total","title","onClose","onPrev","onNext","onFinish","cover","description","nextButtonProps","prevButtonProps","stepRender","stepType","arrow","className","mergedType","isLastStep","prevBtnClick","onClick","nextBtnClick","headerNode","createElement","descriptionNode","coverNode","mergedSlickNode","Array","from","length","keys","map","stepItem","index","key","slickNode","mainBtnType","secondaryBtnProps","ghost","componentName","Tour","contextLocale","_a","_b","Object","assign","size","children","Previous","Finish","Next"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/antd/es/tour/panelRender.js"],"sourcesContent":["import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\nimport React from 'react';\nimport classNames from 'classnames';\nimport CloseOutlined from \"@ant-design/icons/es/icons/CloseOutlined\";\nimport LocaleReceiver from '../locale/LocaleReceiver';\nimport Button from '../button';\nimport defaultLocale from '../locale/en_US';\nconst panelRender = (props, current, type) => {\n  const {\n    prefixCls,\n    total = 1,\n    title,\n    onClose,\n    onPrev,\n    onNext,\n    onFinish,\n    cover,\n    description,\n    nextButtonProps,\n    prevButtonProps,\n    stepRender,\n    type: stepType,\n    arrow,\n    className\n  } = props;\n  const mergedType = typeof stepType !== 'undefined' ? stepType : type;\n  const isLastStep = current === total - 1;\n  const prevBtnClick = () => {\n    onPrev === null || onPrev === void 0 ? void 0 : onPrev();\n    if (typeof (prevButtonProps === null || prevButtonProps === void 0 ? void 0 : prevButtonProps.onClick) === 'function') {\n      prevButtonProps === null || prevButtonProps === void 0 ? void 0 : prevButtonProps.onClick();\n    }\n  };\n  const nextBtnClick = () => {\n    if (isLastStep) {\n      onFinish === null || onFinish === void 0 ? void 0 : onFinish();\n    } else {\n      onNext === null || onNext === void 0 ? void 0 : onNext();\n    }\n    if (typeof (nextButtonProps === null || nextButtonProps === void 0 ? void 0 : nextButtonProps.onClick) === 'function') {\n      nextButtonProps === null || nextButtonProps === void 0 ? void 0 : nextButtonProps.onClick();\n    }\n  };\n  let headerNode;\n  if (title) {\n    headerNode = /*#__PURE__*/React.createElement(\"div\", {\n      className: `${prefixCls}-header`\n    }, /*#__PURE__*/React.createElement(\"div\", {\n      className: `${prefixCls}-title`\n    }, title));\n  }\n  let descriptionNode;\n  if (description) {\n    descriptionNode = /*#__PURE__*/React.createElement(\"div\", {\n      className: `${prefixCls}-description`\n    }, description);\n  }\n  let coverNode;\n  if (cover) {\n    coverNode = /*#__PURE__*/React.createElement(\"div\", {\n      className: `${prefixCls}-cover`\n    }, cover);\n  }\n  const mergedSlickNode = typeof stepRender === 'function' && stepRender(current, total) || _toConsumableArray(Array.from({\n    length: total\n  }).keys()).map((stepItem, index) => /*#__PURE__*/React.createElement(\"span\", {\n    key: stepItem,\n    className: classNames(index === current && `${prefixCls}-slider-active`, `${prefixCls}-slider`)\n  }));\n  const slickNode = total > 1 ? mergedSlickNode : null;\n  const mainBtnType = mergedType === 'primary' ? 'default' : 'primary';\n  const secondaryBtnProps = {\n    type: 'default',\n    ghost: mergedType === 'primary'\n  };\n  return /*#__PURE__*/React.createElement(LocaleReceiver, {\n    componentName: \"Tour\",\n    defaultLocale: defaultLocale.Tour\n  }, contextLocale => {\n    var _a, _b;\n    return /*#__PURE__*/React.createElement(\"div\", {\n      className: classNames(mergedType === 'primary' ? `${prefixCls}-primary` : '', className, `${prefixCls}-content`)\n    }, arrow && /*#__PURE__*/React.createElement(\"div\", {\n      className: `${prefixCls}-arrow`,\n      key: \"arrow\"\n    }), /*#__PURE__*/React.createElement(\"div\", {\n      className: `${prefixCls}-inner`\n    }, /*#__PURE__*/React.createElement(CloseOutlined, {\n      className: `${prefixCls}-close`,\n      onClick: onClose\n    }), coverNode, headerNode, descriptionNode, /*#__PURE__*/React.createElement(\"div\", {\n      className: `${prefixCls}-footer`\n    }, /*#__PURE__*/React.createElement(\"div\", {\n      className: `${prefixCls}-sliders`\n    }, slickNode), /*#__PURE__*/React.createElement(\"div\", {\n      className: `${prefixCls}-buttons`\n    }, current !== 0 ? /*#__PURE__*/React.createElement(Button, Object.assign({}, secondaryBtnProps, prevButtonProps, {\n      onClick: prevBtnClick,\n      size: \"small\",\n      className: classNames(`${prefixCls}-prev-btn`, prevButtonProps === null || prevButtonProps === void 0 ? void 0 : prevButtonProps.className)\n    }), (_a = prevButtonProps === null || prevButtonProps === void 0 ? void 0 : prevButtonProps.children) !== null && _a !== void 0 ? _a : contextLocale.Previous) : null, /*#__PURE__*/React.createElement(Button, Object.assign({\n      type: mainBtnType\n    }, nextButtonProps, {\n      onClick: nextBtnClick,\n      size: \"small\",\n      className: classNames(`${prefixCls}-next-btn`, nextButtonProps === null || nextButtonProps === void 0 ? void 0 : nextButtonProps.className)\n    }), (_b = nextButtonProps === null || nextButtonProps === void 0 ? void 0 : nextButtonProps.children) !== null && _b !== void 0 ? _b : isLastStep ? contextLocale.Finish : contextLocale.Next)))));\n  });\n};\nexport default panelRender;"],"mappings":"AAAA,OAAOA,kBAAkB,MAAM,8CAA8C;AAC7E,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,aAAa,MAAM,0CAA0C;AACpE,OAAOC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